| Visual Basic (Declaration) | |
|---|---|
Public Structure SafeLock(Of TException As {New, Exception}) Inherits System.ValueType | |
| C# | |
|---|---|
public struct SafeLock<TException> : System.ValueType where TException: new(), Exception | |
- TException
Library/Library.Test/LockingTests/TestLockingStructs.cs
| C# | Copy Code |
|---|---|
object instance = new object(); using (new SafeLock<InvalidOperationException>(instance)) { } | |
| VB.NET | Copy Code |
|---|---|
Dim instance As New Object() Using New SafeLock(Of InvalidOperationException)(instance) End Using | |
System.Object
System.ValueType
CSharpTest.Net.Synchronization.SafeLock<TException>
Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7